package homework305;

public class zuoyed5 extends Thread{
    private int start;
    private int end;
    private int result;
    
    public zuoyed5(int start, int end) {
        this.start = start;
        this.end = end;
    }

	@Override
    public void run() {
        for (int i = start; i <= end; i++) {
            result += i;
        }
    }

    public int getResult() {
        return result;
    }
}
